<div id="assignment_message_<?php echo $program_id.$assign_index;?>" class="<?php echo $succ==true?'success_msg':'error_msg'?>">
    <?php echo $message; ?>
</div>

<div class="assignBlock" id="assignment_<?php echo $program_id.$assign_index;?>" style="display: none;">
    <?php
		include_partial('assignCell', array('teachers'=>$my_teachers, 
                                       'program_id'  => $program_id,
                                       'assign_index'  => $assign_index,
                                       'assign_stat' => isset($new_assign_record) ? $new_assign_record->getAssignStatus():'',
                                       'assigned_teacher'=> isset($new_assign_record) ? $new_assign_record->getTeacher()->toArray():null
		));
    ?>
</div>

<script type="text/javascript">
    var f = function() { $('#assignment_message_<?php echo $program_id.$assign_index;?>').fadeOut('slow',function(){ $('#assignment_<?php echo $program_id.$assign_index;?>').fadeIn(); } ); }
    setTimeout('f()',2000);
    <?php 
    $program_id = $program_id;
    if(isset($new_assign_record) && $new_assign_record['assign_status'] == LinkTeacherProgramTable::STATUS_PENDING){?>
        if(!$('#assignment_row_<?php echo $program_id?>').hasClass('row_status_1')){
            $('#assignment_row_<?php echo $program_id?>').addClass('row_status_1');
            $('#assignment_row_<?php echo $program_id?>').removeClass('row_status_2');
            $('#assignment_row_<?php echo $program_id?>').removeClass('row_status_3');
            
			<?php if($new_assign_record){?>				
				$('#assignment_row_<?php echo $program_id.$assign_index?> .assignment_status_cell').html('<?php echo $new_assign_record->getAssignStatusText(); ?>');
			<?php }?>
        }
    <?php }?>    
</script>